#include <fstream>
#include <iostream>
#include <string>

using namespace std;

template <typename T>
T add(T a, T b)
{
    return a + b;
}

int main()
{
    try
    {
        cout << add(1, 2) << endl;
        cout << add(1.1, 2.2) << endl;
        cout << add(string("Hello"), string("World")) << endl;
    }
    catch (const exception &e)
    {
        cerr << "Error: " << e.what() << endl;
    }

    int *a = new int(1);
    int *b = new int(2);

    cout << a << " " << b << endl;
    cout << *a << " " << *b << endl;
    delete a;
    delete b;
}
